//
//  WebViewDetailVC.m
//  HelpThePoor
//
//  Created by 范鑫 on 2017/5/16.
//  Copyright © 2017年 van7ish. All rights reserved.
//

#import "WebViewDetailVC.h"

@interface WebViewDetailVC ()<UIWebViewDelegate>

/** 导航条 */
@property (nonatomic, strong) UIImageView * navBar;

@property (nonatomic, strong) UIWebView * webView;

@end

@implementation WebViewDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = COLOR_LIGHTBGCOLOR;
    self.automaticallyAdjustsScrollViewInsets = NO;
    [self.view addSubview:self.navBar];
    [self.view addSubview:self.webView];
}

- (UIWebView *)webView{
    if (!_webView) {
        _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_W, SCREEN_H - 49)];
        _webView.scrollView.backgroundColor = COLOR_LIGHTBGCOLOR;
        
        [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlStr]]];
        
    }
    return _webView;
}

- (UIImageView *)navBar{
    if (!_navBar) {
        _navBar = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 64)];
        _navBar.image = ImageNamed(@"daohangtiao");
    }
    return _navBar;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
